import request from '@/plugins/request'
import url from '@/plugins/url'



export function get_goods_all(data) {
  return request({
    url: url('/api/goods/get_goods_all'),
    method: 'POST',
    data: data
  })
}



/**
 * 获取单个商品
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function get_goods_one(data){
  return request({
    url:url('/api/goods/get'),
    method:'POST',
    data: data
  })
}


/**
 * 获取商品总条数
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function get_goods_total(data) {
  return request({
    url: url('/api/goods/get_goods_total'),
    method: 'POST',
    data: data
  })
}


/**
 * 修改商品
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function on_goods_edit(data) {
  return request({
    url: url('/api/goods/edit'),
    method: 'POST',
    data: data
  })
}



/**
 * 删除商品
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function on_goods_delete(data) {
  return request({
    url: url('/api/goods/del'),
    method: 'POST',
    data: data
  })
}


/**
 * 获取商品分类
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function get_goods_group(data){
  return request({
    url: url("/api/goods/group_row"),
    method:"POST",
    data:data
  })
}

